﻿using DreamCMS.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DreamCMS.BLL.Factory.Interface
{
    public interface ICategoryDAO
    {
        /// <summary>
        /// 获取
        /// </summary>
        /// <returns></returns>
        List<CategoryInfo> GetAllCategory();

        /// <summary>
        /// 插入一个类别
        /// </summary>
        /// <param name="cat">类别实体</param>
        /// <returns>返回刚刚插入的类别ID</returns>
        long AddCategory(CategoryInfo cat);

        /// <summary>
        /// 更新类别
        /// </summary>
        /// <param name="cat">类别实体</param>
        /// <returns>受影响行数</returns>
        long UpdateCategory(CategoryInfo cat);

        /// <summary>
        /// 删除类别
        /// </summary>
        /// <param name="catId">类别ID</param>
        /// <returns>受影响行数</returns>
        long DeleteCategory(long catId);
    }
}
